#include "../ArithmeticCompresor.h"
#include "ContextTable.h"
#include "../../CompresorUtil.h"
#include "BitManager.h"
#include "math.h"
#include <bitset>

/*
 * DynamicArithmeticCompresor.h
 *
 *  Created on: 27/11/2009
 *      Author: ngonzalez
 */

#ifndef DYNAMICARITHMETICCOMPRESOR_H_
#define DYNAMICARITHMETICCOMPRESOR_H_

#include <iostream>
#include <string>
#include "../Conf/Configuration.h"
using namespace std;

class DynamicArithmeticCompresor: public ArithmeticCompresor{

	public: DynamicArithmeticCompresor();

	public: virtual ~DynamicArithmeticCompresor();

	public: string stringToCompress;

	public: ContextTable *contextTable;

	public: CompresorUtil compresorUtil;

	public: BitManager *bitManager;

	static const int intervalSize = 256;

	public: unsigned int theFloor;

	public: unsigned int theRoof;

	public: virtual string doCompress();

	/*----------------------------Getter & Setters---------------------------------*/
	public: unsigned int getFloor() const;

	public: unsigned int getRoof() const;

	public: void setFloor(unsigned int floor);

	public: void setRoof(unsigned int roof);

	public: ContextTable* getContextTable() const;

	public: BitManager *getBitManager() const;

	string getStringToCompress() const;

	void setStringToCompress(string stringToCompress);

	/*----------------------------Getter & Setters---------------------------------*/

};


#endif /* DYNAMICARITHMETICCOMPRESOR_H_ */
